package com.group3.group3.role.repository;

import com.group3.group3.mybatis.entity.PtRoleEntity;
import com.group3.group3.mybatis.flexigrid.PagingBean;
import com.group3.group3.mybatis.ztree.ZtreeEntity;
import com.group3.group3.role.entity.SearchRoleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleDao {
    List<PtRoleEntity> queryRoleListByPage(@Param("search") SearchRoleEntity search, @Param("paging") PagingBean paging);

    Integer queryRoleListTotal(@Param("search") SearchRoleEntity search);

    List<ZtreeEntity> getMenuZtreeList(@Param("lang") String lang);

    List<String> getMenuZtreeListByRoleId(@Param("roleUuid") String roleUuid);

    void deleteMenuByRole(@Param("roleUuid") String roleUuid);

    void insertMenuRefRole(@Param("roleUuid") String roleUuid,@Param("menuIds") String[] menuIds);

    void addRole(@Param("roleUuid")String uuid, @Param("roleName") String roleName,@Param ("remarks") String remarks);

    void modifyRole(@Param("roleUuid")String uuid, @Param("roleName") String roleName,@Param ("remarks") String remarks);

    List<ZtreeEntity> queryMenuTree();

    void deleteRoleById(String roleUuid);

    List<ZtreeEntity> getPostZtreeList(String toString);
}
